	<?php 
	include './nav.php';

	$gid = $_GET['id'];

	$sql ='select i.icon, g.name, g.price, g.desc, g.id, g.sales
		from goods g, goodsImg i
		where g.id = i.gid and face =1 and hot=1 and up=1 
		';
	// var_dump($sql) ;
	$goods_list = query($sql);
?>

	
	<link rel="stylesheet" href="<?= PUB_CSS?>commond.css">
	<link rel="stylesheet" href="<?= CSS?>index.css">

	<div class='main clear'>
			<div class='main-hot-board'>
				<div class='main-hot clear'>
					<div class='main-hot-l'>
						<ul>
							<li>手机</li>
							<p>荣耀 畅玩 华为 Mate/p系列</p>
							<li>平板&穿戴</li>
							<p>平板 手环 手表</p>
							<li>智能家居</li>
							<p>电力猫 路由器 电视盒子</p>
							<li>必备配件</li>
							<p>保护壳 保护套 贴膜</p>
							<li>基础配件</li>
							<p>音响 移动电源 电池/充电器</p>
							<li>潮流配件</li>
							<p>支架 自拍杆/器 智能开关/插座</p>
							<li>应用市场</li>
							<p>手机游戏 手机应用</p>
						</ul>
					</div>
					<div class='main-hot-r'>
						<img src="/lamp_shop/public/home/images/2015112619554886.jpg" alt="">

					</div>
				</div>
			</div>
		<div class='hr-20'></div>
		<div class='main-layout clear'>
			<div class='main-layout-fl'>
				<div class='main-pro-info'>
					<div class='p-img'>
						<img src="<?= IMG?>1447814425723.png" alt="">
					</div>
					<div>
						<div>
							<div class='hr-20'></div>

							<strong>华为4</strong>
							<div class='hr-10'></div>
							<div class='d1'>美的与众不同</div>	
							<div class='hr-10'></div>
							<div class='d2'>赠送保护壳+Type C 转接头+自拍杆</div>
							<div class='hr-20'></div>
							<div><strong class='s1'>¥988</strong></div>
							<br>
							
							<input class='botton' class ='bot' type="submit" value='立即抢购'>

						</div>


					</div>

				</div>
				<div class='main-pro-info2'>
					<div class='p-img'>
						<img src="<?= IMG?>1448538158297.png" alt="">
					</div>
					<div>
						<div>
							<div class='hr-20'></div>

							<strong>荣耀5</strong>
							<div class='hr-10'></div>
							<div  class='d1'>表里不凡</div>	
							<div class='hr-10'></div>
							<div class='d2'>购机赢取电源票</div>
							<div class='hr-20'></div>
							<div><strong class='s1'>¥1288</strong></div>
							<br>
							
							 <input class='botton'class ='bot' type="submit" value='立即抢购'>

						</div>


					</div>
				</div>
				<div class='main-pro-info3'>
					<div class='p-img'>
						<img src="<?= IMG?>1447850113879.png" alt="">
					</div>
					<div>
						<div>
							<div class='hr-20'></div>

							<strong>荣耀3</strong>
							<div class='hr-10'></div>
							<div  class='d1'>美的与众不同</div>	
							<div class='hr-10'></div>
							<div class='d2'>购机赢取电源票</div>
							<div class='hr-20'></div>
							<div><strong class='s1'>¥888</strong></div>
							<br>
							
							<input class='botton'class ='bot' type="submit" value='立即抢购'>

						</div>


					</div>
				</div>
				<div class='main-pro-info4'>
					<div class='p-img'>
						<img src="<?= IMG?>1448536569380.png" alt="">
					</div>
					<div>
						<div>
							<div class='hr-20'></div>

							<strong> 华为手表</strong>
							<div class='hr-10'></div>
							<div  class='d1'>经典圆形表盘 手表蓝牙通话</div>	
							<div class='hr-10'></div>
							<div class='d2'>和你在一起的日子 想记录你的每一步</div>
							<div class='hr-20'></div>
							<div><strong class='s1'>¥1488</strong></div>
							<br>
							<input class='botton' class ='bot' type="submit" value='立即抢购'>

						</div>


					</div>

				</div>
			</div>
			<div class='main-layout-fr'>
				<img src="/lamp_shop/public/home/images/20151126092209301.jpg" alt="">
			</div>
			<div class='main-layout-fr2'>
				<img src="" alt="">
			</div>
			<div class='main-layout-fr3'>
				<img src="/lamp_shop/public/home/images/20151127001920343.jpg" alt="">
			</div>
			
		</div>
			<div class='hr-20'></div>
			
			<div class='ec-slider-item-img'>
				<img src="/lamp_shop/public/home/images/20151120213959548.jpg" alt="">
			</div>

			<div class='hr-20'></div>

		<div class='main-h-sj'>
		
			<div class='h2'>
					<a calss='main-shouji' href="<?= URL?>404.php">手机</a>
					<i class='main-jingpin'>华为精品手机</i>
				<ul class='main-rong clear'>
					<li><a href="<?= URL?>404.php">运营商合约</a></li>
					<li><a href="<?= URL?>404.php">G/Y系列</a></li>
					<li><a href="<?= URL?>404.php">华为 Mate/p系列</a></li>
					<li><a href="<?= URL?>404.php">畅玩</a></li>
					<li><a href="<?= URL?>404.php">荣耀</a></li>
				</ul>
			</div>
		</div>
	</div>
	<div id='main'>
		

		<div class='main_recommend'>
			<ul>
				<?php foreach($goods_list as $v): ?>
				<li>
					<div class='item_wrap'>
						<div class='item'>
							<div class='item_img'>
								<a href="<?= URL?>home/goods/goods.php?id=<?= $v['id']?>"><img src="<?= img_url($v['icon'],240)?>" alt="" width='240px'></a>
							</div>
							<div class='item_text'>
								<p class='p1'><a href="<?= URL?>home/goods/goods.php?id=<?= $v['id']?>"><?= $v['name']?></a></p>
								<p class='p2'><?= $v['desc']?></p>
								<p class='p3'>
									<span class='s1'>￥<?= $v['price']?></span>
									<span class='s2'>已售 <?= $v['sales']?> 件</span>
								</p>
							</div>
							<a href="<?= URL?>home/goods/goods.php?id=<?= $v['id']?>" class='add_cart'>加入购物车</a>
						</div>
					</div>
				</li>
				<?php endforeach; ?>
			</ul>
		</div>
	</div>


<?php include './foot.php' ?>